Introduction

Get an overview of the contents and understand the structure of this section.

We'll cover the following

Most jobs start out as some type of manual operation that an engineer performs. Over time, these should become documented procedures that have the best practice for doing some operation, and finally, that job should become the work of software that takes those best practices and runs them with the efficiency that only a machine can provide.

One of the core missions of a development-operations (DevOps) engineer is automating these tasks. This can be from the mundane, such as running a few commands, to changing the configuration on thousands of machines.

widget

Automating systems often requires manipulating a system via its command line and calling other tools native to the operating system (OS). This can include using RPM Package Manager (RPM)/Debian Package (dpkg) for installing packages, grabbing stats for a system using common utilities, or configuring network routers.

A DevOps engineer may want to do this locally to automate a series of steps normally done manually (such as automating Kubernetes's kubectl tool) or remotely execute commands on hundreds of machines at the same time. This section will cover how these can be accomplished using Go.

In this section, you will learn how to execute command-line tools on the local machine to accomplish automation goals. To access a remote machine, we'll learn about how to use Secure Shell (SSH) and Expect packages. But knowing how to call executables on machines is just one part of the skillset. We'll also talk about the anatomy of a change and how to do concurrent changes safely.

Structure#

We'll cover the following topics in this section:

Summary and Quiz on Automating Command-Line Tasks
Writing a System Agent
Designing Safe, Concurrent Change Automations
Using SSH in Go to Automate Remote Changes
Using os/exec to Automate Local Changes
Automating Command-Line Tasks
Structure of this lesson

Summary and Quiz on Writing Command-Line Tooling

Using os/exec to Automate Local Changes